/**
 * Created by zhuyongjie on 2017/10/20.
 */

/**
 * datagrid大小自适应浏览器大小
 */
function autoResizeDataGrid(targetId){
    $(window).resize(function () {
        $('#'+targetId).datagrid('resize', {
            width: $(window).width() - 10,
            height: $(window).height() - 10
        }).datagrid('resize', {
            width: $(window).width() - 10,
            height: $(window).height() - 10
        });
    });
}

/**
 * 调整大小
 */
function resizeDataGridSize(targetId) {
    $('#'+targetId).datagrid('resize', {
        width: $(window).width() - 10,
        height: $(window).height() - 10
    }).datagrid('resize', {
        width: $(window).width() - 10,
        height: $(window).height() - 10
    });
}